package 特殊操作流.Properties;

import java.util.Properties;
import java.util.Set;
import java.util.TreeSet;

public class ProppertiesDemo01 {
    public static void main(String[] args) {
        //创建集合对象
//        Properties<String,String> prop=new Properties<String,String>()//不是泛型类不能写泛型
        Properties prop = new Properties();
        //存储元素
        prop.put("666", "姜恒星");
        prop.put("66", "郝万杰");
        prop.put("6", "邓吉壕");

        //遍历集合
        Set<Object> keyset=prop.keySet();
        for (Object obj : keyset) {
            Object value = prop.get(obj);
            System.out.println(obj+ "," + value);
        }
    }
}